package world;

import behavior.AgentSight;

public class Edible extends Entity
{
    //Pass location, food amount, and type of food. Init with these values
    public Edible(int x, int y, int food, boolean type)
    {
        setLocation(x, y);
        setFood(food);
        setType(type);
    }
    
    private int food;  //How much food is left to eat
    private boolean type; //veggie or meat;
    static public final boolean MEAT = true;
    static public final boolean VEGGIE = false;

    public AgentSight getAgentSight()
    {
        AgentSight as = new AgentSight();
        if (getType() == MEAT)
        {
            as.setSpecies(-2);
        }
        else
        {
            as.setSpecies(-1);
        }
        as.setLife(getFood());
        as.setPregnant(false);
        return as;
    }

    public void setLocation(int x, int y)
    {
        this.setX(x);
        this.setY(y);
    }
    
    public int getFood() {
        return food;
    }

    public void setFood(int food) {
        this.food = food;
    }

    public boolean getType() {
        return type;
    }

    public void setType(boolean type) {
        this.type = type;
    }
}
